aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/ecash/[id]/+page.server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-08-20 16:13:18 -0700
committerAdam Soltys <[email protected]>2024-08-20 16:13:18 -0700
commitb7d9213ffec4aeb09508ca71f02880dca1c56a23 (patch)
treec438cb108b32ce2100ff6659791cf283c9b0eeea /src/routes/(app)/ecash/[id]/+page.server.js
parentb549489aa400e623cf93b44f19aacbd62bbc1830 (diff)
downloadcoinos-ui-b7d9213ffec4aeb09508ca71f02880dca1c56a23.tar.gz
coinos-ui-b7d9213ffec4aeb09508ca71f02880dca1c56a23.zip
show spent ecash
Diffstat (limited to 'src/routes/(app)/ecash/[id]/+page.server.js')
-rw-r--r--src/routes/(app)/ecash/[id]/+page.server.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes/(app)/ecash/[id]/+page.server.js b/src/routes/(app)/ecash/[id]/+page.server.js
index c5f24e82..421c8cb6 100644
--- a/src/routes/(app)/ecash/[id]/+page.server.js
+++ b/src/routes/(app)/ecash/[id]/+page.server.js
@@ -4,6 +4,8 @@ import parse from "$lib/parse";
export async function load({ cookies, params, request, url }) {
let { id } = params;
- let token = await get(`/cash/${id}`);
- return { id, token };
+ let { token, status } = await get(`/cash/${id}`);
+ let spent = parseInt(status.spent);
+ let total = parseInt(status.total);
+ return { id, token, spent, total };
}